package com.ag.answergames.util;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

/**
 * @author 杨金乾
 */
public class IdJsonSerialize extends JsonSerializer<Long> {
    @Override
    public void serialize(Long integer, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeString(integer+"");
    }
}
